package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/11/15
 */
@Entity
@Table(name = "member_level_base")
public class MemberLevelBaseEntity extends BaseEntity{
    private String memberLevel;
    private String description;
    private String levelName;

    @Basic
    @Column(name = "member_level")
    public String getMemberLevel() {
        return memberLevel;
    }

    public void setMemberLevel(String l2RLevel) {
        this.memberLevel = l2RLevel;
    }

    @Basic
    @Column(name = "description")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Basic
    @Column(name = "level_name")
    public String getLevelName() {
        return levelName;
    }

    public void setLevelName(String levelName) {
        this.levelName = levelName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MemberLevelBaseEntity that = (MemberLevelBaseEntity) o;

        if (memberLevel != null ? !memberLevel.equals(that.memberLevel) : that.memberLevel != null) return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;
        return levelName != null ? levelName.equals(that.levelName) : that.levelName == null;
    }

    @Override
    public int hashCode() {
        int result = memberLevel != null ? memberLevel.hashCode() : 0;
        result = 31 * result + (description != null ? description.hashCode() : 0);
        result = 31 * result + (levelName != null ? levelName.hashCode() : 0);
        return result;
    }
}
